#ifndef NET_GUI_H
#define NET_GUI_H

#include <QWidget>
#include "jwidget/jdialog.h"
#include <QDialog>
#include "InputMethod/inputmethod.h"

#define MODE_GETIP  1
#define MODE_GETDNS 2

#define NET_SH "/etc/net.sh"
#define SHELL	"#!/bin/sh"

extern bool GetIPV4Gateway(const char * pNICName, char *pGateway, unsigned long len) ;

QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE


class NetSettings : public JDialog
{
    Q_OBJECT
    
 public:
     NetSettings(QWidget *parent = 0);
    ~NetSettings();
    void checkMode();

    
    InputMethod *im;

    QLineEdit       *qlineedit_ip;
    QLineEdit       *qlineedit_mask;
    QLineEdit       *qlineedit_gw;
    QLineEdit       *qlineedit_dns;
	QLineEdit       *qlineedit_mac;
	
    QLineEdit       *Dip;


    QStringList ipInfo;
    QString		ethInfo;

	QString ipCmd;
	QString gwCmd;
	QString hwCmd;
	QString maskCmd;

	QComboBox *mode;


    QProcess *process;
    QProcess *process1;
    QProcess *process2;
    QProcess *process_mac;
private slots:
     void createImConnect(QString ObjName);
     void saveChange();
     void refreshAll();
     void getDip();
     void recoverToMay();
	void readOut();
	void readOut1();
	void modeChanged();

     

private:


};


#endif // NET_GUI_H

